package com.demo.http;

import java.io.Serializable;
import java.util.Properties;

public class JobResult implements Serializable {
	
	private static final long serialVersionUID = 1L;
	public static final int RUNNING = 1;
	public static final int KILLED = 2;
	public static final int SUCCEED = 3;
	public static final int FAILED = 4;
	
	private String id;		// task id
    
	private int status;
	
	private String errDesc;
	
	private Properties properties;
	
	private String runServer;
	
	private JobConf jobConf;

	public JobResult() {
	}

	public JobResult(String id) {
		this(id, RUNNING, null, null);
	}
	
	public JobResult(String id, int status) {
		this(id, status, null, null);
	}
	
	public JobResult(String id, String runServer, int status) {
		this.id = id;
		this.runServer = runServer;
		this.status = status;
	}
	
	public JobResult(String id, int status, String errDesc, Properties properties) {
		this.id = id;
		this.status = status;
		this.errDesc = errDesc;
		this.properties = properties;
	}
	
	public String getId() {
		return id;
	}

	public int getStatus() {
		return status;
	}
	
	public void setStatus(int status) {
		this.status = status;
	}
	
	public String getErrDesc() {
		return errDesc;
	}

	public void setErrDesc(String errDesc) {
		this.errDesc = errDesc;
	}

	public Properties getProperties() {
		return properties;
	}
	
	public void setProperties(Properties properties) {
		this.properties = properties;
	}

	public String getRunServer() {
		return runServer;
	}

	public void setRunServer(String runServer) {
		this.runServer = runServer;
	}
	
	public JobConf getJobConf() {
		return jobConf;
	}

	public void setJobConf(JobConf jobConf) {
		this.jobConf = jobConf;
	}
}
